package se.webbzon.boltzmann.minigame.cells;

import java.awt.Color;

public class CellBar {
	
	// The color of the bar
	private Color color;
	
	// The value of the bar
	private double value;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public CellBar() {
		this(Color.white,0);
	}
	
	public CellBar(Color color, double value) {
		this.color = color;
		this.value = value;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the color of the cell bar. **/
	public Color getColor() {
		return color;
	}

	/** Sets the color of the cell bar. **/
	public void setColor(Color color) {
		this.color = color;
	}

	/** Returns the value of the cell bar. **/
	public double getValue() {
		return value;
	}

	/** Sets the color of the cell bar. **/
	public void setValue(double value) {
		if (value > 1)
			this.value = 1;
		else if (value < 0)
			this.value = 0;
		else
			this.value = value;
	}

}
